<template>
    <!-- pages/signDetail/sign/sign.wxml -->
    <view class="pagebg">
        <view class="page-section-spacing">
            <view :class="'scroll-view-item ' + (item.status == 1 ? 'scroll_select' : '')" v-for="(item, index) in eventList" :key="index">
                <view class="timeline_icon">
					<image :src="item.status==1?'../../../static/timeline_select.png':'../../../static/timeline.png'" mode=""></image>
				</view>
                <view class="timeline_box">
                    <text class="timeline_box_title">{{ item.signTimeRange }}</text>
					<text class="timeline_box_title margin-tb-xs">入场签到</text>
                    <view v-if="item.address" class="timeline_box_info">
                        地点：
                        <text>{{ item.address }}</text>
                    </view>
                    <view v-if="item.remark" class="timeline_box_info">
                        备注：
                        <text>{{ item.remark }}</text>
                    </view>
                    <view class="timeline_btnbox">
                        <button v-if="item.address" @tap="onClick" class="button_1">
                            <text lines="1" class="btntext" style="color: rgba(26, 117, 255, 1)">导航</text>
                        </button>
                        <button v-if="!isEdit && item.status == 1 && item.signStatus == 0" @tap="onClick" class="button_2">
                            <text lines="1" class="btntext">签到</text>
                        </button>
                        <view v-if="item.signStatus == 1" class="signed">
                            <text lines="1" class="signText">已签到</text>
                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
// pages/signDetail/sign/sign.js
export default {
    data() {
        return {};
    },
    props: {
        isEdit: {
            type: Boolean
        },
        eventList: {
            type: Object
        }
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {},
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {}
};
</script>
<style lang="scss">
/* pages/signDetail/sign/sign.wxss */
.page-section-spacing {
    margin-top: 10px;
    background-color: rgba(242, 242, 242, 1);
}

.scroll-view_H {
    white-space: nowrap;
}

.scroll-view-item {
    height: auto;
    float: left;
    margin-top: 40rpx;
}

.jiantou {
    width: 30px;
    height: 30px;
}

.timeinfo {
    background-color: rgba(255, 255, 255, 1);
    border-radius: 20rpx;
    margin-top: 24rpx;
    padding: 20rpx 24rpx 16rpx 32rpx;
}

.scroll-view-item {
    margin-top: 10rpx;
    width: 100%;
    margin-bottom: 20rpx;
	min-height: 288upx;
    position: relative;
    background-color: rgba(242, 242, 242, 1);
	&.scroll_select{
		.timeline_box_title{
			font-size: 32upx;
			font-family: PingFangSC-Semibold, PingFang SC;
			font-weight: 600;
			color: #1A75FF;
		}
	}
}

.scroll-view-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    height: 100%;
    width: 1px;
    border-right: 1px dashed #d8d8d8;
    z-index: 1;
}

.timeline_icon {
    position: absolute;
    z-index: 8;
    position: absolute;
    left: 10rpx;
    top: 0rpx;
    width: 56rpx;
    height: 56rpx;
	image{
		width: 56rpx;
		height: 56rpx;
	}
}

.timeline_box {
    background-color: rgba(255, 255, 255, 1);
    border-radius: 20rpx;
    flex-direction: column;
    padding: 30rpx;
    float: right;
    width: 596upx;
    position: relative;
}

.timeline_box_title {
    overflow-wrap: break-word;
    color: rgba(51, 51, 51, 1);
    font-size: 32rpx;
    font-family: PingFangSC-Semibold;
    text-align: left;
    white-space: nowrap;
    line-height: 44rpx;
    margin-right: 34rpx;
}

.timeline_box_title2 {
    overflow-wrap: break-word;
    color: rgba(51, 51, 51, 1);
    font-size: 28rpx;
    font-family: PingFangSC-Semibold;
    text-align: left;
    white-space: nowrap;
    line-height: 40rpx;
    margin: 12rpx 384rpx 0 0;
}

.timeline_box_info {
    overflow-wrap: break-word;
    color: rgba(102, 102, 102, 1);
    font-size: 24rpx;
    text-align: left;
    white-space: nowrap;
    line-height: 24rpx;
    margin-top: 12rpx;
}

.timeline_btnbox {
    float: right;
}

.button_1 {
    background-color: rgba(255, 255, 255, 1);
    border-radius: 30rpx;
    border: 1px solid rgba(26, 117, 255, 1);
    padding: 6rpx 28rpx 6rpx 28rpx !important;
}

.text_14 {
    overflow-wrap: break-word;
    color: rgba(26, 117, 255, 1);
    font-size: 28rpx;
    text-align: center;
    white-space: nowrap;
    line-height: 40rpx;
}

.button_2 {
    background-color: rgba(26, 117, 255, 1);
    border-radius: 30rpx;
    display: inline;
    padding: 6rpx 28rpx 6rpx 28rpx;
}

.signed {
    background-color: rgba(26, 117, 255, 0.5);
    border-radius: 30rpx;
    color: #ffffff;
    margin: 16rpx 0 0 18rpx;
    padding: 8rpx 22rpx 8rpx 22rpx;
}
.signText {
    color: #fff !important;
}

.signText {
    overflow-wrap: break-word;
    color: rgba(0, 0, 0, 1);
    font-size: 28rpx;
    text-align: center;
    line-height: 40rpx;
}

.btntext {
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 1);
    font-size: 28rpx;
    text-align: center;
    line-height: 40rpx;
}

.timeline_box::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 100%;
    height: 0;
    width: 0;
    border: 7px solid transparent;
    border-right: 7px solid white;
}

.scroll_select .timeline_box {
    &::after{
		content: "";
		position: absolute;
		width: 80%;
		height:10upx;
		top: 0;
		left: 9%;
		background: #1A75FF;
	}
}
.pagebg {
    background-color: rgba(242, 242, 242, 1);
}

.scroll_select .timeline_icon {
    background: url('https://hd.kotom.cn/profile/svg/timeline_icon_hover.svg') 100% no-repeat;
}
</style>
